package jdbcmapper;

import java.io.IOException;

public class ServiceManager {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String command = "c:\\windows\\system32\\cmd.exe /c echo Hello World";
		command = "c:\\windows\\system32\\net.exe stop \"Amazon Unbox Video Service\"";
		try {
			Runtime rt = Runtime.getRuntime();
			Process p =rt.exec(command);
			for(int i = p.getErrorStream().read();i != -1;i = p.getErrorStream().read()){
				System.err.print((char)i);
			}
			for(int i = p.getInputStream().read();i != -1;i = p.getInputStream().read()){
				System.out.print((char)i);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
